<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRankingsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ranking', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_users中的id
			$table->integer('uid');
			//tinyint 3 排名类型，0为用户
			$table->tinyInteger('type');
			//int 11 排名次序，数字越大，越靠前
			$table->integer('ranking');

			$table->softDeletes();


		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('rankings');
	}

}
